package cc.douquan.com.doutu.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cc.douquan.com.doutu.R;
import cc.douquan.com.doutu.entity.ClassifyEntity;
import cc.douquan.com.doutu.utils.GlideUtis;

/**
 * Created by feq on 2016/11/16.
 */

public class FenleiAdapter extends BaseQuickAdapter<ClassifyEntity.DataEntity.TagListEntity> {

    public FenleiAdapter(int layoutResId, List<ClassifyEntity.DataEntity.TagListEntity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, ClassifyEntity.DataEntity.TagListEntity tagListEntity) {
        GlideUtis.setImg(tagListEntity.getGifPath(),(ImageView) baseViewHolder.getView(R.id.iv_img));
        if (null != tagListEntity.getName())
            baseViewHolder.setText(R.id.tv_name, tagListEntity.getName());
    }
}
